<template>
	<view>
		<view>我是scanCode页面</view>
		<button @click="scanCode">扫码</button>
	</view>
</template>

<script lang="ts" setup>
	const scanCode = () => {
		uni.scanCode({
			success: function (res) {
				console.log('条码类型：' + res.scanType);
				console.log('条码内容：' + res.result);
			}
		});
	}
</script>

<style>
	       
</style>
